<template>
  <div class="admin">
      <!-- 面包屑 -->
      	<el-breadcrumb separator=">" class="crumbs">
      	  	<el-breadcrumb-item :to="{ path: '/admin'}">管理员管理</el-breadcrumb-item>
      	</el-breadcrumb>
      <!-- 查询条件 -->
      <el-row :gutter="20">
        <el-col :span="11">
          <el-col :span="8" class="inquireText">权限名称</el-col>
          <el-col :span="16"><el-input placeholder="请输入内容"></el-input></el-col>
        </el-col>
        <el-col :span="11">
            <el-col :span="8" class="inquireText">权限代码</el-col>
            <el-col :span="16"><el-input placeholder="请输入内容"></el-input></el-col>
        </el-col>
        <el-col :span="2"><el-button @click="inquire">查询</el-button></el-col>        
      </el-row>
      <!-- 列表展示 -->
      <el-table :data="tableData" style="width: 100%" stripe class="table">
        <el-table-column prop="date" label="权限代码" width="220"></el-table-column>
        <el-table-column  prop="name" label="权限名称" width="220"></el-table-column>
        <el-table-column  prop="address" label="权限描述"></el-table-column>
        <el-table-column fixed="right"label="操作" width="170">
            <template scope="scope">
                <el-button @click.native.prevent="operation(scope.$index)" type="text" size="small">修改</el-button>
                <el-button @click.native.prevent="operation(scope.$index)" type="text" size="small" v-if="!1">删除</el-button>
                <el-button @click.native.prevent="operation(scope.$index)" type="text" size="small" v-if="1">恢复</el-button>
                <el-button @click.native.prevent="operation(scope.$index)" type="text" size="small">重置密码</el-button>
                
            </template>
        </el-table-column>
      </el-table>
      <!-- 分页 -->
      <el-pagination
      class="sorter"
      @size-change=""
      @current-change=""
      :current-page.sync="firstPage"
      :page-size="100"
      layout="prev, pager, next, jumper"
      :total="1000">
    </el-pagination>
  </div>
</template>

<script>
export default {
    name: 'legalList',
    data () {
        return {
        tableData:[],
        firstPage:1
        }
    },
    methods:{
		inquire() {},
        operation (index) {}
	},
	created () {
        this.$http.get(this._path + 'users').then((res) => {
            this.tableData = res.data.data.page.content
        })
	}
}
</script>

<style scoped lang="scss">
@import "./../style/admin.scss"
</style>
